//声明异步函数
async function calldeepseek() {
    const apikey='sk-7e5c482f6de2470cb86f66af6e505bfe';
    const apiurl='https://api.deepseek.com/chat/completions';
    const response=await fetch(apiurl,{
        method:'POST',
        headers:{
            'Content-Type':'application/json',
            'Authorization':`Bearer ${apikey}`
        },
        body:JSON.stringify({
            model:"deepseek-chat",
            messages:[
                {role:"system",content:"你是一个有用的帮手"},
                //{role:"user" ,content:"请说一下deepseek"}
            ],
        max_tokens:1000
        })
    });
    const data=await response.json();
    document.getElementById('textcontent').innerHTML=data.choices[0].message.content;
}calldeepseek();